window.onresize = function(){
  //获取html标签
  var theHTML = document.documentElement;
  //获取html的宽度
  var htmlWidth = document.documentElement.clientWidth;
  //1024 - 1920 屏幕的适配
  if(htmlWidth<1024){
    htmlWidth = 1024;
  }
  if(htmlWidth>1920){
    htmlWidth=1920;
  }
  //rem的适配
  document.documentElement.style.fontSize = htmlWidth/(1920/24);
}
window.onresize()